package cn.com.code.design;

/**
 * 懒汉式 线程安全
 *
 * @author zhengpei
 * @date 2021/9/17
 */
public class Singleton04 {

  private static class SingletonHolder {
    private static Singleton04 singleton04 = new Singleton04();
  }

  private Singleton04() {
  }

  public static Singleton04 getInstance() {
    return SingletonHolder.singleton04;
  }

}
